// packageH/sign_shopV2/component/companyList/companyList.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    show: {
      type: Boolean,
      value: false
    },
    list: {
      type: Array,
      value: []
    },
  },
  observers: {
    'show': function(valA,valB) {
      this.setData({
        changeCompany: valA
      })
    },
  },
  /**
   * 组件的初始数据
   */
  data: {
    changeCompany: false,
    radio: "1"
  },

  /**
   * 组件的方法列表
   */
  methods: {
    onClickRadie(event) {
      const { id } = event.currentTarget.dataset;
      this.setData({
        radio: id,
      });
    },
    changeCid() {
      this.triggerEvent('changeCid',{cid: this.data.radio});
      this.hiddenPop();
    },
    addCompany(){
      this.hiddenPop();
      this.triggerEvent('addCompany',{});
    },
    hiddenPop(){
      this.setData({
        changeCompany: false
      })
    }
  }
})
